<?php echo $this->form;?>
<script>
$("#file").change(function(e){
    // get image
    var thisObj = $(this);
    var url = URL.createObjectURL(e.target.files[0]);
    var img = new Image();    
    var canvas = document.createElement("canvas");
    canvas.setAttribute("class","thumb");    
    var ctx = canvas.getContext('2d');
    img.onload = function() {
        var h = 100, per = img.width/img.height;
        var w = h*per;
        canvas.height = h;
        canvas.width = w;
        $(".thumb").remove();
        thisObj.parent().append("<br/>");
        thisObj.parent().append(canvas);
        ctx.drawImage(img, 0, 0,w ,h);    
    }
    img.src = url;   
});

var editor1 = CKEDITOR.replace( 'product_describe_vi' );
var editor2 = CKEDITOR.replace( 'product_describe_en' );

</script>

<script type="text/javascript">
	$(document).ready(function() {
		/*
		 *  Simple image gallery. Uses default settings
		 */

		$('.fancybox').fancybox({
			width: '70%',
			height: '80%',
			autoSize	: false,
			overlayShow	: true,
			helpers : {
				overlay:{
					closeClick: false, 
				} 
			}
			
		});

		
	});
</script>










